﻿<link href="~css//admin/css/font-awesome.css" rel="stylesheet" />

<link href="~/css/admin/css/login.css" rel="stylesheet" />
<link href="~/css/admin/css/x-admin.css" rel="stylesheet" />
<script src="~/css/admin/js/jquery.min.js"></script>
<script src="~/css/admin/lib/layui/layui.js"></script>
<script src="~/css/admin/Scripts/jquery-1.8.0.js"></script>
<div class="login layui-anim layui-anim-up">
    <div class="message">用户登录</div>
    <div id="darkbannerwrap"></div>
    <form id="frmlogin">
        <input name="Name" placeholder="用户名" type="text" lay-verify="required" class="layui-input">
        <hr class="hr15">
        <input name="Password" lay-verify="required" placeholder="密码" type="password" class="layui-input">
        <hr class="hr15">
        <input value="登录" lay-submit lay-filter="login" style="width:100%;" type="button" onclick="login()">
        <hr class="hr20">
    </form>
</div>
@section Scripts{
    <script>
        function login() {
            var re = $("#frmlogin").serialize();
            $.post("/Admin/Login/Login", re, function (r) {
                if (r.success) {
                    location.href = "/Admin/Home/Index";
                }
                else {
                    alert("用户或密码错误");
                }
            }, "json")

        }
    </script>
    }